#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

const int N = 100;
typedef long long LL;
int t[N], d[N], l[N];


int main()
{
	int k;
	cin >> k;
	while (k--)
	{
		int n;
		cin >> n;
		LL time = 0;
		bool biaoji = 0;
		for (int i = 0; i < n; ++i)
			cin >> t[i] >> d[i] >> l[i];
		for (int i = 0; i < n; ++i)
			for (int j = 0; j < n - i - 1; ++j)
			{
				if (t[j] + d[j] > t[j + 1] + d[j + 1])
				{
					swap(t[j], t[j + 1]);
					swap(d[j], d[j + 1]);
					swap(l[j], l[j + 1]);
				}
			}
		for (int i = 0; i < n; ++i)
		{
			if (time > t[i] + d[i])
			{
				biaoji = 1;
				cout << "NO\n";
				break;
			}
			time = max((int)time, t[i]);
			time += l[i];
		}
		if (biaoji)continue;
		else cout << "YES\n";
	}
	return 0;
